Skip to content

docs: Improve CoreConcepts.md structure with '5 Core Principles'#20

Merged
takeshishimada merged 1 commit intomainfrom
docs/improve-core-concepts-structure
Oct 31, 2025
Merged

docs: Improve CoreConcepts.md structure with '5 Core Principles'#20
takeshishimada merged 1 commit intomainfrom
docs/improve-core-concepts-structure

Conversation

@takeshishimada
Copy link
Copy Markdown
Contributor

Summary

  • Restructured CoreConcepts.md to clearly communicate Flow's design philosophy through "The 5 Core Principles"
  • Enhanced explanations with better benefits and rationale for each principle
  • Aligned formatting with other documentation files

Key Improvements

Structure

  • ✅ Organized as "The 5 Core Principles" with clear numbering and hierarchy
  • ✅ Each principle now has explicit Benefits sections
  • ✅ Moved middleware to "Additional Features" (not a core principle)

New Content

  • Principle 2: View-Local State: Aligned with SwiftUI Philosophy

    • Explains why Flow avoids global stores
    • Contrasts with other libraries that create store hierarchies
    • Emphasizes alignment with SwiftUI's philosophy
  • Enhanced Principle 4: MainActor Isolation

    • Improved benefits list:
      • Code locality - all related code in one place
      • Intuitive - write naturally like regular Swift
      • Compile-time safety - data races caught at compile time
      • No manual dispatch needed
    • Added comparison with traditional patterns

Formatting

  • ✅ Removed separator lines (---) to match other docs (GettingStarted, PracticalGuide)
  • ✅ Consistent heading structure throughout

Inspiration

This structure is inspired by the Medium article's "Flowの5つのコア原則" section, which clearly communicates Flow's design philosophy. The English documentation now has the same clarity and persuasiveness.

Test Plan

  • Review the five principles for clarity and accuracy
  • Verify formatting consistency with other documentation files
  • Check that all code examples are correct
  • Ensure all doc links work properly

🤖 Generated with Claude Code

Restructured the Core Concepts documentation to better communicate Flow's
design philosophy:

- Organized content into "The 5 Core Principles" with clear numbering
- Added "View-Local State: Aligned with SwiftUI Philosophy" section
  explaining why Flow avoids global stores and store hierarchies
- Enhanced "MainActor Isolation" section with better benefits:
  - Code locality - all related code in one place
  - Intuitive - write naturally like regular Swift
  - Compile-time safety - data races caught at compile time
  - No manual dispatch needed
- Moved "Observable Actions" (middleware) to "Additional Features"
  as it's not a core principle
- Removed separator lines (---) to match other documentation format
- Added clearer "Benefits" sections for each principle
- Improved explanations of why each principle matters

This structure is inspired by the Medium article's clear communication
of Flow's design philosophy.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 31, 2025
@takeshishimada takeshishimada self-assigned this Oct 31, 2025
@takeshishimada takeshishimada merged commit 12521a8 into main Oct 31, 2025
9 checks passed
takeshishimada added a commit that referenced this pull request Oct 31, 2025
Updated both README.md and README_jp.md to match the "5 Core Principles"
structure from MEDIUM_ARTICLE_EN.md:

1. Unidirectional Data Flow (newly added)
   - Explains the fundamental flow: Action → Handler → State → View
   - Emphasizes predictability and debuggability

2. View-Local State (evolved from "No Global Store")
   - Emphasizes alignment with SwiftUI's philosophy
   - Highlights no global stores or store hierarchies

3. Result-Returning Actions (simplified)
   - More concise code examples
   - Clear benefits: functional patterns, parent controls side effects

4. MainActor Isolation (evolved from "Swift 6 Concurrency")
   - Emphasizes direct state updates in async context
   - Benefits: code locality, intuitive, compile-time safety

5. @observable Support (simplified)
   - Kept concise with essential benefits

Removed:
- "Observable Actions" section (middleware is not a core principle)
  Users can discover middleware through documentation

This creates consistency across:
- README.md / README_jp.md
- CoreConcepts.md (already updated in PR #20)
- MEDIUM_ARTICLE_EN.md / MEDIUM_ARTICLE_JP.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant